import { createApp } from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import locale from 'element-plus/es/locale/lang/zh-cn'

// 分页组件
import Pagination from '@/components/Pagination'
import { useDict } from '@/utils/dict'

import Cookies from 'js-cookie'
const app = createApp(App)
// 全局方法挂载
app.config.globalProperties.useDict = useDict

app.component('Pagination', Pagination)

app.use(router)
app.use(store)

app.use(ElementPlus, {
  locale: locale,
  // 支持 large、default、small
  size: Cookies.get('size') || 'default'
})


app.mount('#app')
